2 research outputs found
Type Classes for Mathematics in Type Theory
The introduction of first-class type classes in the Coq system calls for
re-examination of the basic interfaces used for mathematical formalization in
type theory. We present a new set of type classes for mathematics and take full
advantage of their unique features to make practical a particularly flexible
approach formerly thought infeasible. Thus, we address both traditional proof
engineering challenges as well as new ones resulting from our ambition to build
upon this development a library of constructive analysis in which abstraction
penalties inhibiting efficient computation are reduced to a minimum.
The base of our development consists of type classes representing a standard
algebraic hierarchy, as well as portions of category theory and universal
algebra. On this foundation we build a set of mathematically sound abstract
interfaces for different kinds of numbers, succinctly expressed using
categorical language and universal algebra constructions. Strategic use of type
classes lets us support these high-level theory-friendly definitions while
still enabling efficient implementations unhindered by gratuitous indirection,
conversion or projection.
Algebra thrives on the interplay between syntax and semantics. The
Prolog-like abilities of type class instance resolution allow us to
conveniently define a quote function, thus facilitating the use of reflective
techniques
A Formal Proof of PAC Learnability for Decision Stumps
We present a formal proof in Lean of probably approximately correct (PAC)
learnability of the concept class of decision stumps. This classic result in
machine learning theory derives a bound on error probabilities for a simple
type of classifier. Though such a proof appears simple on paper, analytic and
measure-theoretic subtleties arise when carrying it out fully formally. Our
proof is structured so as to separate reasoning about deterministic properties
of a learning function from proofs of measurability and analysis of
probabilities.Comment: 13 pages, appeared in Certified Programs and Proofs (CPP) 202